<?php
	require 'libraries/CostLib.php';
	require 'libraries/UserLibrary.php';
	session_start();
	
	isSessionSet("administrator", null, "index.php");
?>
<html>
	<head>
		<title>CASLIMS | Analysis Portal</title>
		<link rel="stylesheet" type="text/css" href="scripts/page.css" />
		<link href="tools/favicon.ico" rel="shortcut icon" type="image/x-icon" /> 
	</head>
	<body>
		<div id="header"></div>
		<div id="wrapper">
			<div id="pagetop">
				<div class="greeting">Hi, <?php echo $_SESSION["administrator"];?> | <a href="Logout.php">Log out</a> | <a href="AdministratorHomepage.php"> Home </a></div>
				<div class="homepage"><?php echo $_SESSION["administrator"];?></div>
			</div>
			<div id="fieldname">
				<h1>View Analysis Cost Tree</h1>
			</div>
			<div id="sub-body">
			<?php
				$resultMain = getMainTypes("casl", "localhost", "editcost", "editcost");
				foreach ($resultMain as $strMain){
					echo $strMain."</br>";
					$resultSub = getSampleTypes($strMain, "casl", "localhost", "editcost", "editcost");
					echo"<ul>";
					foreach ($resultSub as $strSub){
						echo"<li>";
						printf("<a href='ViewCost.php?mainType=%s&subType=%s'>%s</a></br>", $strMain, $strSub, $strSub);
						echo"</li>";
					}
					echo"</ul>";
				}
			?>
			</div>
			<div id="buttons">
				<input type="button" value="Home" onClick='document.location.href = "AdministratorHomepage.php"'>
			</div>
			<div id="footerwrap">
				<div id="footer"> 
					<div class="copyright">Copyright 2011.<a>CASL BIOTECH-UPLB.</a> All Rights Reserved.<br/> 
				Arianne Buse&ntilde;os | Darlene Joy Masong | Rick Jason Obrero | Jonathan Pandi | Jonathan Simbahan | Emmanuel Soriano 
					</div> 
	    	    </div>
			</div>				
		</div>
	</body>
</html>